﻿@model GameSchool.Models.ViewModels.ProfileManagementView

@{
    ViewBag.Title = "ProfileManagement";
}

<h2>Breyting á upplýsingum</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend id="ChangeInfo">Notaðu formið að neðan til að breyta þínum upplýsingum</legend>

            @Html.HiddenFor(model => model.User_ID)

        <div class="editor-label">
            @Html.LabelFor(model => model.OldPassword)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.OldPassword)
            @Html.ValidationMessageFor(model => model.OldPassword)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.NewPassword)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.NewPassword)
            @Html.ValidationMessageFor(model => model.NewPassword)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ConfirmPassword)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ConfirmPassword)
            @Html.ValidationMessageFor(model => model.ConfirmPassword)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ImageSource)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ImageSource)
        </div>
        <div class="editor-field">
            @Html.ValidationMessageFor(model => model.ImageSource)
            <img src="@Model.ImageSource" alt="Andlitið á þér" />
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Email)
        </div>

        <div class="editor-field">
            @Html.EditorFor(model => model.Email)
            @Html.ValidationMessageFor(model => model.Email)
        </div>

        <input class="SaveChanges" type="submit" value="Save" />
        
    </fieldset>
}

<div>
    @Html.ActionLink("Til baka", "StudentIndex")
</div>
